# coding: utf-8
from common.models.user import User
from application import db


class Plan(db.Model):
    __tablename__ = 'plan'
    id = db.Column(db.Integer, primary_key=True)
    uid = db.Column(db.Integer,db.ForeignKey('user.id'))
    type = db.Column(db.Integer)
    companyone = db.Column(db.String(30, 'utf8mb4_0900_ai_ci'))
    companytwo = db.Column(db.String(30, 'utf8mb4_0900_ai_ci'))
    classone = db.Column(db.String(30, 'utf8mb4_0900_ai_ci'))
    classtwo = db.Column(db.String(30, 'utf8mb4_0900_ai_ci'))

    project = db.Column(db.String(30, 'utf8mb4_0900_ai_ci'))
    name = db.Column(db.String(30, 'utf8mb4_0900_ai_ci'))
    zbsize = db.Column(db.String(30, 'utf8mb4_0900_ai_ci'))
    zbyt = db.Column(db.String(30, 'utf8mb4_0900_ai_ci'))
    zbfw = db.Column(db.String(30, 'utf8mb4_0900_ai_ci'))

    plandate = db.Column(db.Date)
    planstartdate = db.Column(db.Date)
    startdate = db.Column(db.Date)
    nowdate = db.Column(db.Date)
    mark = db.Column(db.Integer)
    differ = db.Column(db.Integer)
    bz= db.Column(db.TEXT)


    creater = db.relationship('User', foreign_keys=uid)
